﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE

Public Class PacBC

    Public Function cargar_pac(ByVal PPER As String, ByVal PERIODO As String) As DataTable
        Dim objPACDA As PacDA
        Dim objDt As DataTable

        Try
            objPACDA = New PacDA
            objDt = objPACDA.cargar_pac(PPER, PERIODO)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try

    End Function

    Public Function CargarFechaPAC(ByVal strAno As String) As DataTable
        Dim objPACDA As PacDA
        Dim objDt As DataTable

        Try
            objPACDA = New PacDA
            objDt = objPACDA.CargarFechaPAC(strAno)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try

    End Function

    Public Function MostrarFechas(ByVal strSeg As String)
        Dim objPACDA As PacDA
        Dim objDt As DataTable

        Try
            objPACDA = New PacDA
            objDt = objPACDA.MostrarFechas(strSeg)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function ListaPeriodoPAC(ByVal ano As String) As DataTable
        Dim objPACDA As PacDA
        Dim objDt As DataTable

        Try
            objPACDA = New PacDA
            objDt = objPACDA.ListaPeriodoPAC(ano)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Sub insert_avancepac2(ByVal id_seg As String, ByVal id_pac As String, ByVal stado As String, ByVal accion As String, ByVal comentario As String, ByVal periodo As String)
        Dim objPACDA As PacDA

        Try
            objPACDA = New PacDA
            objPACDA.insert_avance_pac(id_seg, id_pac, stado, accion, comentario, periodo)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub update_avance_pac(ByVal id_seg As String, ByVal stado As String, ByVal accion As String, ByVal comentario As String, ByVal periodo As String)
        Dim objPACDA As PacDA

        Try
            objPACDA = New PacDA
            objPACDA.update_avance_pac(id_seg, stado, accion, comentario, periodo)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub InsertarFechas(ByVal id_seg As String, ByVal id_fec As String, ByVal strFecha As String)
        Dim objPACDA As PacDA

        Try
            objPACDA = New PacDA
            objPACDA.InsertarFechas(id_seg, id_fec, strFecha)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub
End Class
